class MeetingDatasController < ApplicationController

  def index
    @meeting_datas = MeetingData.all
  end
  
  def show
    @meeting_data = MeetingData.find(params[:id])
  end
  
  def new
    @meeting_data = MeetingData.new
  end
  
  def create
    @meeting_data = MeetingData.new(params[:meeting_data])
    if @meeting_data.save
      flash[:notice] = "Successfully created meeting data."
      redirect_to @meeting_data
    else
      render :action => 'new'
    end
  end
  
  def edit
    @meeting_data = MeetingData.find(params[:id])
  end
  
  def update
    @meeting_data = MeetingData.find(params[:id])
    if @meeting_data.update_attributes(params[:meeting_data])
      flash[:notice] = "Successfully updated meeting data."
      redirect_to @meeting_data
    else
      render :action => 'edit'
    end
  end
  
  def destroy
    @meeting_data = MeetingData.find(params[:id])
    @meeting_data.destroy
    flash[:notice] = "Successfully destroyed meeting data."
    redirect_to meeting_datas_url
  end
end
